<?php
/**
 * Created by JetBrains PhpStorm.
 * User: guansong
 * Date: 17/2/22
 * Time: 上午10:05
 * To change this template use File | Settings | File Templates.
 */

namespace app\home\model;


use think\Model;

class Newstype extends Model {
//    protected $auto = ['name'];
//    protected $insert = ['name'=>'22222222222222222222222222a'];
//    protected $update=['name'=>'自动'];
//    protected $validate = [
//        'rule'=>[
//            'name' => 'require|max:25',
//            'id'   => 'require',
//        ],
//    ];

//验证规则
//    protected $rule=[
//        'name' => 'require|max:2',
//        'id'   => 'require'
//    ];
//    protected $message=[
//        'name.require' =>'类型名称不能为空！',
//        'name.max'     => '类型最多25隔自负',
//        'id'           => '编辑时 id 不能为空！'
//    ];
//    protected $scene= [
//        'add'   =>  ['name'],
//        'edit'  =>  ['name','id']
//    ];
}